const initialState = {
  count: 0,
};
export default function countReducer(state = initialState, action: any) {
  switch (action.type) {
    case "INCREMENT":
      return {
        ...initialState,
        count: initialState.count + 1,
      };
    case "DECREMENT":
      return {
        ...initialState,
        count: initialState.count - 1,
      };
    case "INCREMENT_ASYNC":
      return initialState.count;
    default:
      return initialState;
  }
}
